View Javadoc

1   /***
2    * Copyright (c) 2003 held jointly by the individual authors.            
3    *                                                                          
4    * This library is free software; you can redistribute it and/or modify it    
5    * under the terms of the GNU Lesser General Public License as published      
6    * by the Free Software Foundation; either version 2.1 of the License, or 
7    * (at your option) any later version.                                            
8    *                                                                            
9    * This library is distributed in the hope that it will be useful, but 
10   * WITHOUT ANY WARRANTY; with out even the implied warranty of 
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
12   * GNU Lesser General Public License for more details.                                                  
13   *                                                                           
14   * You should have received a copy of the GNU Lesser General Public License   
15   * along with this library;  if not, write to the Free Software Foundation,   
16   * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.              
17   *                                                                            
18   * > http://www.gnu.org/copyleft/lesser.html                                  
19   * > http://www.opensource.org/licenses/lgpl-license.php
20   */
21  package net.mlw.vlh.adapter.jdbc;
22  
23  
24  /***
25   * This adapter handles the standard functionality of creating a query and
26   * execution it...
27   * 
28   * net.mlw.vlh.adapter.jdbc.AbstractJdbcAdapter
29   * 
30   * @author Matthew L. Wilson, Andrej Zachar
31   * @version $Revision: 1.2 $ $Date: 2005/08/19 16:06:29 $
32   */
33  public abstract class AbstractDynaJdbcAdapter extends AbstractJdbcAdapter
34  {
35     /*** Sets weather the name of the column, or the alias of the column is used. * */
36     private boolean useName = false;
37  
38     private boolean lowerCase = false;
39  
40     public AbstractDynaJdbcAdapter()
41     {
42     }
43  
44     public boolean isUseName()
45     {
46        return useName;
47     }
48  
49     /***
50      * Sets weather the name of the column, or the alias of the column is used.
51      * For example:
52      * <p>
53      * SELECT X as Y from dual; X = name Y = alias
54      * </p>
55      * 
56      * @param useName
57      *            true: use the name of the column false: use the name of the
58      *            alias
59      */
60     public void setUseName(boolean useName)
61  
62     {
63        this.useName = useName;
64     }
65  
66     public boolean isLowerCase()
67     {
68        return lowerCase;
69     }
70  
71     /***
72      * Sets weather the name of the column should be lowecase;
73      * 
74      * @param lowerCase
75      */
76     public void setLowerCase(boolean lowerCase)
77     {
78        this.lowerCase = lowerCase;
79     }
80  }